package com.sky.wsp.mongodb;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Optional;

/**
 * @author wangshaopeng@talkweb.com.cn
 * @desccription 在此输入描述
 * @date 2023/10/10
 */
@Service
public class InterfaceService {
    @Resource
    private InterfaceRepository repository;

    public Interface get(Integer id) {
        Optional<Interface> byId = repository.findById(id);
        if (byId.isPresent()) {
            Interface anInterface = byId.get();
            return anInterface;
        }
        return null;
    }
}
